package org.turman.buobaobook.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.turman.buobaobook.mapper.BookSourceMapper;
import org.turman.buobaobook.model.entity.BookSource;
import org.turman.buobaobook.model.request.QueryBookBean;
import org.turman.buobaobook.service.BookSourceService;

import java.util.List;

@Service("bookSourceService")
public class BookSourceServiceImpl implements BookSourceService {
    @Autowired
    private BookSourceMapper bookSourceMapper;

    @Override
    public BookSource selectById(Long sourceId) {
        return bookSourceMapper.selectById(sourceId);
    }

    @Override
    public List<BookSource> selectAll() {
        return bookSourceMapper.selectList(null);
    }

    @Override
    public List<BookSource> listByPage(QueryBookBean queryBookBean) {
        return bookSourceMapper.listByPage(queryBookBean);
    }

    @Override
    public void update(BookSource bookSource) {
        bookSourceMapper.update(bookSource);
    }
}
